<?php
if(!isset($_SESSION)) session_start();
?>
﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>EAN API TEST</title>
        <meta name="keywords" content="" />
        <meta name="description" content="" />
        <link href="css/templatemo_style.css" rel="stylesheet" type="text/css" />
        <link href="css/widget.css" rel="stylesheet" type="text/css" />
        <script type="text/javascript" src="js/swfobject/swfobject.js"></script>
        <script type="text/javascript">
            var flashvars = {};
            flashvars.cssSource = "css/piecemaker.css";
            flashvars.xmlSource = "piecemaker.xml";

            var params = {};
            params.play = "true";
            params.menu = "false";
            params.scale = "showall";
            params.wmode = "transparent";
            params.allowfullscreen = "true";
            params.allowscriptaccess = "always";
            params.allownetworking = "all";

            swfobject.embedSWF('piecemaker.swf', 'piecemaker', '960', '440', '10', null, flashvars,
            params, null);
        </script>

        <script language="javascript" type="text/javascript">
            function clearText(field)
            {
                if (field.defaultValue == field.value) field.value = '';
                else if (field.value == '') field.value = field.defaultValue;
            }
        </script>
        <script type="text/javascript">
            function add_room()
            {
                for(i=2;i<=8;i++)
                {
                    if(document.getElementById('room'+i).style.display=="none")
                    {
                        document.getElementById('room'+i).style.display="inline"
                        break;
                    }

                }


            }
        </script>
        <link rel="stylesheet" type="text/css" href="css/ddsmoothmenu.css" />

        <script type="text/javascript" src="js/jquery.min.js"></script>
        <script type="text/javascript" src="js/ddsmoothmenu.js">

            /***********************************************
             * Smooth Navigational Menu- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
             * This notice MUST stay intact for legal use
             * Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
             ***********************************************/

        </script>

        <script type="text/javascript">

            ddsmoothmenu.init({
                mainmenuid: "templatemo_menu", //menu DIV id
                orientation: 'h', //Horizontal or vertical menu: Set to "h" or "v"
                classname: 'ddsmoothmenu', //class added to menu's outer DIV
                //customtheme: ["#1c5a80", "#18374a"],
                contentsource: "markup" //"markup" or ["container_id", "path_to_menu_file"]
            })

        </script>

        <style type="text/css">
            .row
            {
                background:#D6D6CE;


            }


            .roomTitle
            {
                border:1px solid #000000;
                background-color:#D6D6CE;
                color:#000;
                padding:3px;

            }

            #booking_step1
            {
                width:100%;
                background-color:#3D3D3A;

            }
            #booking_step1 td
            {
                color:#FFF;
                padding:5px;
            }

            #booking_step2
            {
                width:100%;
                background-color:#3D3D3A;

            }
            #booking_step2 td
            {
                color:#FFF;
                padding:5px;
            }
            .active
            {
                display:block;

            }
            .inactive
            {
                display:none;
            }
            #booking_page
            {
                background:url(./images/templatemo_middle.jpg);

            }
            #booking_page h2 {
                font-size: 21px;
                margin: 0 0 0px;
            }

            #step_1
            {
                height:50px;
            }

            #step_2
            {
                height:50px;
            }
            .step_active
            {
                background:url(./images/booking_step_active.png);
                background-size:100% 100%;
            }
            .step_inactive
            {
                background:url(./images/booking_step_inactive.png);
                opacity:0.6;
                background-size:100% 100%;
            }
            .rounded
            {
                border-radius:5px;
            }
            .error
            {
                color:#FF0000;
                padding:5px;
            }
            input,textarea
            {
                border-radius:5px;
                border-color:#000;
            }
            .bookingPage_right
            {

                width:300px;
                padding:10px;
                vertical-align:top;
            }
            .bookingPage_left
            {

                width:600px;
                padding:10px;

            }
            .checkOutInfo
            {
                background: url(./images/templatemo_middle.jpg);
                padding: 5px;

            }
            .colored
            {
                background-color:#D6D6CE;
            }
            .colored h4
            {
                padding:5px;
            }

            .borderedItems
            {
                border: 1px solid #000000;
                margin-bottom: 5px;
                margin-top: 5px;
            }
        </style>
        <?php
        require('../../Smarty/libs/Smarty.class.php');

        $smarty = new Smarty;

        $smarty->setTemplateDir('./smarty/templates/');
        $smarty->setCompileDir('./smarty/templates_c/');
        $smarty->setConfigDir('./smarty/configs/');
        $smarty->setCacheDir('./smarty/cache/');

        if (empty($_SESSION['logged_bool'])) {
            $_SESSION['logged_bool'] = false;
        }
        $status = $_SESSION['logged_bool'];

        $smarty->assign("logged", $status);
        ?>
    </head>
    <body style="top: -16px; position: relative;">
        <?php
        $smarty->display('header.tpl');
        $smarty->display('flashyBox.tpl');
        ?>
        <?php
        $postVars = array(
            0 => "supplierType",
            1 => "roomRateKey",
            2 => "roomRateCode",
            3 => "roomTypeCode",
            4 => "hotelImage",
            5 => "hotelName",
            6 => "roomDescription",
            7 => "total",
            8 => "averageRate"

        );

        $ok = true;

        for ($i = 0; $i < count($postVars); $i++) {
            if ($_POST[$postVars[$i]]) {
                $ok = false;
            }
        }
        ?>
        <div align="center">
            <table>
                <tr>
                    <td class="bookingPage_left">

                        <form action="book.php" method="post">
                            <?php
                            echo'<input name="hotelId"  type="hidden" value="' . $_POST["hotelId"] . '"/>';
                            echo'<input name="supplierType"  type="hidden" value="' . $_POST["supplierType"] . '"/>';
                            echo'<input name="roomRateKey" type="hidden" value="' . $_POST["roomRateKey"] . '"/>';
                            echo'<input name="roomRateCode" type="hidden" value="' . $_POST["roomRateCode"] . '"/>';
                            echo'<input name="roomTypeCode" type="hidden" value="' . $_POST["roomTypeCode"] . '"/>';
                            ?>
                            <div id="booking_page" style="width:100%;padding:5px;">
                                <table width="100%">
                                    <tr>
                                        <td  id="step_1" class="step_active" align="center">
                                            Step 1
                                        </td>
                                        <td  id="step_2" class="step_inactive" align="center">
                                            Step 2
                                        </td>
                                    </tr>
                                </table>
                                <div  id="booking_step1" class="active">
                                    <table width="100%" cellspacing="0">
                                        <tr class="row">
                                            <td>
                                                <h2 style="color:#000;">
                                                    Guest Details
                                                </h2>
                                            </td>
                                        </tr>
                                    </table>

                                    <?php
                                    for ($i = 1; $i <= $_SESSION["roomsNumber"]; $i++) {
                                        echo
                                        '
                         <table width="100%">
                                <tr>
                                   	<td>
                                    	<h5 class="roomTitle">
                                    		Room:';
                                        echo $i;
                                        echo':';
                                        echo "Adults:" . $_SESSION["roomsData"][$i]["adults"] . ", Children:" . $_SESSION["roomsData"][1]["childrenNr"];
                                        echo '
                                        </h5>
                                    </td>
                                </tr>
                                <tr >
                                    <td  >
                                        <label>
                                        	First Name
                                        </label>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <input id="guest.firstName';
                                        echo $i;
                                        echo'.continue" type="hidden" value="0">
                                        <input type="text" value="" maxlength="100" name="guest.firstName';
                                        echo $i;
                                        echo'" onBlur="checkNameValidity(this,\'errorFirstName';
                                        echo $i;
                                        echo'\',\'guest.firstName';
                                        echo $i;
                                        echo'.continue\')">
                                        <div id="errorFirstName';
                                        echo $i;
                                        echo'" class="error">
                                        </div>
                                    </td>
                                </tr>
                                <tr >
                                    <td  >
                                        <label>Last Name</label>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <input id="guest.lastName';
                                        echo $i;
                                        echo'.continue" type="hidden" value="0">
                                        <input type="text" value=""  maxlength="100" name="guest.lastName';
                                        echo $i;
                                        echo'" onBlur="checkNameValidity(this,\'errorLastName';
                                        echo $i;
                                        echo '\',\'guest.lastName';
                                        echo $i;
                                        echo'.continue\')">
                                        <div id="errorLastName';
                                        echo $i;
                                        echo'" class="error">
                                        </div>
                                     </td>
                                </tr>

                                <input type="hidden" value="NS" name="rooms';
                                        echo $i;
                                        echo'.smokingPreferenceId">

                              </table>';
                                    }
                                    ?>
                                    <table width="100%">
                                        <tr class="row" >
                                            <td>
                                                <h2 style="color:#000;" >
                                                    Contact Details
                                                </h2>
                                            </td>
                                        </tr>
                                        <tr >
                                            <td>
                                                <p>
                                                    We require a valid email address to contact you with the details of your booking.
                                                </p>
                                            </td>
                                        </tr>
                                        <tr >
                                            <td>
                                                <label>
                                                    Email Address
                                                </label>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <input id="contactDetails.emaiAddress.continue" type="hidden" value="0">
                                                    <input id='email1' type="text" value="" maxlength="100" name="contactDetails.email"
                                                           onBlur="checkEmailValidity(this,'emailError','contactDetails.emaiAddress.continue')">
                                                        <div  id="emailError" class="error">
                                                        </div>
                                                        </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                <label>
                                                                    Confirm Email Address
                                                                </label>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                <input id="contactDetails.confirmEmailAddress.continue" type="hidden" value="0">
                                                                    <input type="text" id="email2" value="" maxlength="100" name="contactDetails.confirmEmail" onBlur="emailMatch('email1','email2','confirmEmailError','contactDetails.confirmEmailAddress.continue')">

                                                                        <div class="error" id="confirmEmailError">
                                                                        </div>
                                                                        </td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td>
                                                                                <p>
                                                                                    Needed if there are questions about your reservation.
                                                                                </p>
                                                                            </td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td>
                                                                                <label>
                                                                                    Phone Number:
                                                                                </label>
                                                                            </td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td>
                                                                                <input id="contactDetails.phoneNumber.continue" type="hidden" value="0">
                                                                                    <input type="text" value="" maxlength="16" name="contactDetails.phoneNumber" onBlur="checkPhoneValidity(this,'phoneError','contactDetails.phoneNumber.continue')" >
                                                                                        <div class="error" id="phoneError">
                                                                                        </div>
                                                                                        </td>
                                                                                        </tr>
                                                                                        <tr >
                                                                                            <td align="right">
                                                                                                <input id="go_to_step2" type="hidden" value="stop">
                                                                                                    <button  value="Continue" onClick="chechFileldsValidityStep1();switch_step(1,2)"  name="nextStep" type="button">
                                                                                                        Continue
                                                                                                    </button>

                                                                                            </td>
                                                                                        </tr>
                                                                                        </table>
                                                                                        </div>

                                                                                        <div id="booking_step2" class="inactive">
                                                                                            <table width="100%" cellspacing="0" border="0">
                                                                                                <tr class="row">
                                                                                                    <td>
                                                                                                        <h2 style="color:#000;">
                                                                                                            Credit Card Information
                                                                                                        </h2>
                                                                                                    </td>
                                                                                                </tr>
                                                                                                <tr>
                                                                                                    <td>
                                                                                                        <label>
                                                                                                            Card Type:
                                                                                                        </label>
                                                                                                    </td>
                                                                                                </tr>
                                                                                                <tr>
                                                                                                    <td>
                                                                                                        <input id="creditCardInformation.cardType.continue" type="hidden" value="0">
                                                                                                            <select name="creditCardInformation.cardType" onChange="checkCardType(this,'erorCardType','creditCardInformation.cardType.continue')">

                                                                                                                <option value="VI">Visa</option>
                                                                                                                <option value="AX">American Express</option>
                                                                                                                <option value="MC">Master Card</option>
                                                                                                                <option value="" selected="selected">- Select Your Card Type -</option>
                                                                                                            </select>
                                                                                                            <div class="error" id="erorCardType">
                                                                                                            </div>
                                                                                                    </td>
                                                                                                </tr>
                                                                                                <tr>
                                                                                                    <td>
                                                                                                        <label>
                                                                                                            Card Number
                                                                                                        </label>
                                                                                                    </td>
                                                                                                </tr>
                                                                                                <tr>
                                                                                                    <td>
                                                                                                        <input id="creditCardInformation.creditCardNumber.continue" type="hidden" value="0" autocomplete="off">
                                                                                                            <input maxlength="100" name="creditCardInformation.cardNumber" autocomplete="off" type="text" onBlur="checkCreditCardNumber(this,'creditCardError','creditCardInformation.creditCardNumber.continue')">
                                                                                                                <div class="error" id="creditCardError">
                                                                                                                </div>
                                                                                                                </td>
                                                                                                                </tr>
                                                                                                                <tr>
                                                                                                                    <td>
                                                                                                                        <label>
                                                                                                                            Cardholder First Name
                                                                                                                        </label>
                                                                                                                    </td>
                                                                                                                </tr>
                                                                                                                <tr>
                                                                                                                    <td>
                                                                                                                        <input id="creditCardInformation.cardHolderFirstName.continue" type="hidden" value="0">
                                                                                                                            <input maxlength="100" name="cerditCardInformation.cardHolderFirstName" type="text" onBlur="checkNameValidity(this,'errorCardHolderFirstName','creditCardInformation.cardHolderFirstName.continue')">
                                                                                                                                <div class="error" id='errorCardHolderFirstName'>
                                                                                                                                </div>
                                                                                                                                </td>
                                                                                                                                </tr>
                                                                                                                                <tr>
                                                                                                                                    <td>
                                                                                                                                        <label>
                                                                                                                                            Cardholder Last Name
                                                                                                                                        </label>
                                                                                                                                    </td>
                                                                                                                                </tr>
                                                                                                                                <tr>
                                                                                                                                    <td>
                                                                                                                                        <input id="creditCardInformation.cardHolderLastName.continue" type="hidden" value="0">
                                                                                                                                            <input maxlength="100" name="creditCardInformation.cardHolderLastName" type="text" onBlur="checkNameValidity(this,'errorCardHolderLastName','creditCardInformation.cardHolderLastName.continue')">
                                                                                                                                                <div class="error" id="errorCardHolderLastName">
                                                                                                                                                </div>
                                                                                                                                                </td>
                                                                                                                                                </tr>

                                                                                                                                                <tr>
                                                                                                                                                    <td>
                                                                                                                                                        <label for="expiration-date" on>
                                                                                                                                                            Expiration Date
                                                                                                                                                        </label>
                                                                                                                                                    </td>
                                                                                                                                                </tr>
                                                                                                                                                <tr>
                                                                                                                                                    <td>
                                                                                                                                                        <input id="creditCardInformation.expirationDate.continue" type="hidden" value="0" >
                                                                                                                                                            <select name="creditCardInformation.expirationDate.month" id='creditCardInformation.ExpirationDate.Month' >
                                                                                                                                                                <option value="" selected="selected">-- Month -</option>
                                                                                                                                                                <option value="01">01-January</option>
                                                                                                                                                                <option value="02">02-February</option>
                                                                                                                                                                <option value="03">03-March</option>
                                                                                                                                                                <option value="04">04-April</option>
                                                                                                                                                                <option value="05">05-May</option>
                                                                                                                                                                <option value="06">06-June</option>
                                                                                                                                                                <option value="07">07-July</option>
                                                                                                                                                                <option value="08">08-August</option>
                                                                                                                                                                <option value="09">09-September</option>
                                                                                                                                                                <option value="10">10-October</option>
                                                                                                                                                                <option value="11">11-November</option>
                                                                                                                                                                <option value="12">12-December</option>
                                                                                                                                                            </select>

                                                                                                                                                            <select name="creditCardInformation.expirationDate.year"
                                                                                                                                                                    onChange="checkExpirationDate(this,'creditCardInformation.ExpirationDate.Month','errorCreditCardExpirationDate','creditCardInformation.expirationDate.continue')" >
                                                                                                                                                                <option value="" selected="selected">- Year -</option>
                                                                                                                                                                <?php
                                                                                                                                                                for ($year = date("Y"); $year < 18 + date("Y"); $year++) {
                                                                                                                                                                    echo'<option value="' . $year . '">' . $year . '</option>';
                                                                                                                                                                }
                                                                                                                                                                ?>
                                                                                                                                                            </select>
                                                                                                                                                            <div class="error" id="errorCreditCardExpirationDate">
                                                                                                                                                            </div>
                                                                                                                                                    </td>
                                                                                                                                                </tr>
                                                                                                                                                <tr>
                                                                                                                                                    <td>
                                                                                                                                                        <label for="security-code">
                                                                                                                                                            Security Code
                                                                                                                                                        </label>
                                                                                                                                                    </td>
                                                                                                                                                </tr>
                                                                                                                                                <tr>
                                                                                                                                                    <td>  <input id="creditCardInformation.securityCode.continue" type="hidden" value="0" >
                                                                                                                                                            <input maxlength="4" name="creditCardInformation.securityCode" type="text" onBlur="checkCardSecurityCode(this,'errorCardSecurityCode','creditCardInformation.securityCode.continue');">
                                                                                                                                                                <div class="error" id="errorCardSecurityCode">
                                                                                                                                                                </div>
                                                                                                                                                                </td>
                                                                                                                                                                </tr>
                                                                                                                                                                <tr>
                                                                                                                                                                    <td class="row">
                                                                                                                                                                        <h2 style="color:#000;">
                                                                                                                                                                            Billing Address:
                                                                                                                                                                        </h2>
                                                                                                                                                                    </td>
                                                                                                                                                                </tr>
                                                                                                                                                                <tr>
                                                                                                                                                                    <td>
                                                                                                                                                                        <p class="checkout-info-label">
                                                                                                                                                                            The billing address provided must match the credit card that is used to reserve your room.
                                                                                                                                                                        </p>
                                                                                                                                                                    </td>
                                                                                                                                                                </tr>
                                                                                                                                                                <tr>
                                                                                                                                                                    <td>
                                                                                                                                                                        <label>
                                                                                                                                                                            Country
                                                                                                                                                                        </label>
                                                                                                                                                                    </td>
                                                                                                                                                                </tr>
                                                                                                                                                                <tr>
                                                                                                                                                                    <td>
                                                                                                                                                                        <select name="billingAdress.country" class="select countries-list index" onChange="checkCountry(this,'stateField','stateLebel','billingAdress.stateField.continue')">
                                                                                                                                                                            <option value="AF">Afghanistan</option>
                                                                                                                                                                            <option value="AX">Aland Islands</option>
                                                                                                                                                                            <option value="AL">Albania</option>
                                                                                                                                                                            <option value="DZ">Algeria</option>
                                                                                                                                                                            <option value="AS">American Samoa</option>
                                                                                                                                                                            <option value="AD">Andorra</option>
                                                                                                                                                                            <option value="AO">Angola</option>
                                                                                                                                                                            <option value="AI">Anguilla</option>
                                                                                                                                                                            <option value="AQ">Antarctica</option>
                                                                                                                                                                            <option value="AG">Antigua and Barbuda</option>
                                                                                                                                                                            <option value="AR">Argentina</option>
                                                                                                                                                                            <option value="AM">Armenia</option>
                                                                                                                                                                            <option value="AW">Aruba</option>
                                                                                                                                                                            <option value="AU">Australia</option>
                                                                                                                                                                            <option value="AT">Austria</option>
                                                                                                                                                                            <option value="AZ">Azerbaijan</option>
                                                                                                                                                                            <option value="BS">Bahamas</option>
                                                                                                                                                                            <option value="BH">Bahrain</option>
                                                                                                                                                                            <option value="BD">Bangladesh</option>
                                                                                                                                                                            <option value="BB">Barbados</option>
                                                                                                                                                                            <option value="BY">Belarus</option>
                                                                                                                                                                            <option value="BE">Belgium</option>
                                                                                                                                                                            <option value="BZ">Belize</option>
                                                                                                                                                                            <option value="BJ">Benin</option>
                                                                                                                                                                            <option value="BM">Bermuda</option>
                                                                                                                                                                            <option value="BT">Bhutan</option>
                                                                                                                                                                            <option value="BO">Bolivia</option>
                                                                                                                                                                            <option value="BA">Bosnia and Herzegovina</option>
                                                                                                                                                                            <option value="BW">Botswana</option>
                                                                                                                                                                            <option value="BV">Bouvet Island</option>
                                                                                                                                                                            <option value="BR">Brazil</option>
                                                                                                                                                                            <option value="IO">British Indian Ocean Territory</option>
                                                                                                                                                                            <option value="BN">Brunei Darussalam</option>
                                                                                                                                                                            <option value="BG">Bulgaria</option>
                                                                                                                                                                            <option value="BF">Burkina Faso</option>
                                                                                                                                                                            <option value="KH">Cambodia</option>
                                                                                                                                                                            <option value="CM">Cameroon</option>
                                                                                                                                                                            <option value="CA">Canada</option>
                                                                                                                                                                            <option value="CV">Cape Verde</option>
                                                                                                                                                                            <option value="KY">Cayman Islands</option>
                                                                                                                                                                            <option value="CF">Central African Republic</option>
                                                                                                                                                                            <option value="TD">Chad</option>
                                                                                                                                                                            <option value="CL">Chile</option>
                                                                                                                                                                            <option value="CN">China</option>
                                                                                                                                                                            <option value="CX">Christmas Island</option>
                                                                                                                                                                            <option value="CC">Cocos (Keeling) Islands</option>
                                                                                                                                                                            <option value="CO">Colombia</option>
                                                                                                                                                                            <option value="KM">Comoros</option>
                                                                                                                                                                            <option value="CG">Congo</option>
                                                                                                                                                                            <option value="CD">Congo, the Democratic Republic of the</option>
                                                                                                                                                                            <option value="CK">Cook Islands (New Zealand)</option>
                                                                                                                                                                            <option value="CR">Costa Rica</option>
                                                                                                                                                                            <option value="CI">Cote d'ivoire</option>
                                                                                                                                                                            <option value="HR">Croatia</option>
                                                                                                                                                                            <option value="CU">Cuba</option>
                                                                                                                                                                            <option value="CY">Cyprus</option>
                                                                                                                                                                            <option value="CZ">Czech Republic</option>
                                                                                                                                                                            <option value="DK">Denmark</option>
                                                                                                                                                                            <option value="DJ">Djibouti</option>
                                                                                                                                                                            <option value="DM">Dominica</option>
                                                                                                                                                                            <option value="DO">Dominican Republic</option>
                                                                                                                                                                            <option value="EC">Ecuador</option>
                                                                                                                                                                            <option value="EG">Egypt</option>
                                                                                                                                                                            <option value="SV">El Salvador</option>
                                                                                                                                                                            <option value="GQ">Equatorial Guinea</option>
                                                                                                                                                                            <option value="ER">Eritrea</option>
                                                                                                                                                                            <option value="EE">Estonia</option>
                                                                                                                                                                            <option value="ET">Ethiopia</option>
                                                                                                                                                                            <option value="FK">Falkland Islands</option>
                                                                                                                                                                            <option value="FO">Faroe Islands</option>
                                                                                                                                                                            <option value="FJ">Fiji</option>
                                                                                                                                                                            <option value="FI">Finland</option>
                                                                                                                                                                            <option value="FR">France</option>
                                                                                                                                                                            <option value="GF">French Guiana</option>
                                                                                                                                                                            <option value="PF">French Polynesia</option>
                                                                                                                                                                            <option value="TF">French Southern Territories</option>
                                                                                                                                                                            <option value="GA">Gabon</option>
                                                                                                                                                                            <option value="GM">Gambia</option>
                                                                                                                                                                            <option value="GE">Georgia</option>
                                                                                                                                                                            <option value="DE">Germany</option>
                                                                                                                                                                            <option value="GH">Ghana</option>
                                                                                                                                                                            <option value="GI">Gibraltar</option>
                                                                                                                                                                            <option value="GR">Greece</option>
                                                                                                                                                                            <option value="GL">Greenland</option>
                                                                                                                                                                            <option value="GD">Grenada</option>
                                                                                                                                                                            <option value="GP">Guadeloupe</option>
                                                                                                                                                                            <option value="GU">Guam</option>
                                                                                                                                                                            <option value="GT">Guatemala</option>
                                                                                                                                                                            <option value="GG">Guernsey</option>
                                                                                                                                                                            <option value="GN">Guinea</option>
                                                                                                                                                                            <option value="GW">Guinea-Bissau</option>
                                                                                                                                                                            <option value="GY">Guyana</option>
                                                                                                                                                                            <option value="HT">Haiti</option>
                                                                                                                                                                            <option value="HM">Heard Island and McDonald Islands</option>
                                                                                                                                                                            <option value="VA">Holy See (Vatican City State)</option>
                                                                                                                                                                            <option value="HN">Honduras</option>
                                                                                                                                                                            <option value="HK">Hong Kong</option>
                                                                                                                                                                            <option value="HU">Hungary</option>
                                                                                                                                                                            <option value="IS">Iceland</option>
                                                                                                                                                                            <option value="IN">India</option>
                                                                                                                                                                            <option value="ID">Indonesia</option>
                                                                                                                                                                            <option value="IR">Iran, Islamic Republic of</option>
                                                                                                                                                                            <option value="IQ">Iraq</option>
                                                                                                                                                                            <option value="IE">Ireland</option>
                                                                                                                                                                            <option value="IM">Isle of Man</option>
                                                                                                                                                                            <option value="IL">Israel</option>
                                                                                                                                                                            <option value="IT">Italy</option>
                                                                                                                                                                            <option value="JM">Jamaica</option>
                                                                                                                                                                            <option value="JP">Japan</option>
                                                                                                                                                                            <option value="JE">Jersey</option>
                                                                                                                                                                            <option value="JO">Jordan</option>
                                                                                                                                                                            <option value="KZ">Kazakhstan</option>
                                                                                                                                                                            <option value="KE">Kenya</option>
                                                                                                                                                                            <option value="KI">Kiribati</option>
                                                                                                                                                                            <option value="KP">Korea</option>
                                                                                                                                                                            <option value="KR">Korea, Republic of</option>
                                                                                                                                                                            <option value="KW">Kuwait</option>
                                                                                                                                                                            <option value="KG">Kyrgyzstan</option>
                                                                                                                                                                            <option value="LA">Lao People's Democratic Republic</option>
                                                                                                                                                                            <option value="LV">Latvia</option>
                                                                                                                                                                            <option value="LB">Lebanon</option>
                                                                                                                                                                            <option value="LS">Lesotho</option>
                                                                                                                                                                            <option value="LR">Liberia</option>
                                                                                                                                                                            <option value="LY">Libyan Arab Jamahiriya</option>
                                                                                                                                                                            <option value="LI">Liechtenstein</option>
                                                                                                                                                                            <option value="LT">Lithuania</option>
                                                                                                                                                                            <option value="LU">Luxembourg</option>
                                                                                                                                                                            <option value="MO">Macao</option>
                                                                                                                                                                            <option value="MK">Macedonia, the former Yugoslav Republic of</option>
                                                                                                                                                                            <option value="MG">Madagascar</option>
                                                                                                                                                                            <option value="MW">Malawi</option>
                                                                                                                                                                            <option value="MY">Malaysia</option>
                                                                                                                                                                            <option value="MV">Maldives</option>
                                                                                                                                                                            <option value="ML">Mali</option>
                                                                                                                                                                            <option value="MT">Malta</option>
                                                                                                                                                                            <option value="MH">Marshall Islands</option>
                                                                                                                                                                            <option value="MQ">Martinique</option>
                                                                                                                                                                            <option value="MR">Mauritania</option>
                                                                                                                                                                            <option value="MU">Mauritius</option>
                                                                                                                                                                            <option value="YT">Mayotte</option>
                                                                                                                                                                            <option value="MX">Mexico</option>
                                                                                                                                                                            <option value="FM">Micronesia, Federated States of.</option>
                                                                                                                                                                            <option value="MD">Moldova, Republic of</option>
                                                                                                                                                                            <option value="MC">Monaco</option>
                                                                                                                                                                            <option value="MN">Mongolia</option>
                                                                                                                                                                            <option value="ME">Montenegro</option>
                                                                                                                                                                            <option value="MS">Montserrat</option>
                                                                                                                                                                            <option value="MA">Morocco</option>
                                                                                                                                                                            <option value="MZ">Mozambique</option>
                                                                                                                                                                            <option value="MM">Myanmar</option>
                                                                                                                                                                            <option value="NA">Namibia</option>
                                                                                                                                                                            <option value="NR">Nauru</option>
                                                                                                                                                                            <option value="NP">Nepal</option>
                                                                                                                                                                            <option value="NL">Netherlands</option>
                                                                                                                                                                            <option value="AN">Netherlands Antilles</option>
                                                                                                                                                                            <option value="NC">New Caledonia</option>
                                                                                                                                                                            <option value="NZ">New Zealand</option>
                                                                                                                                                                            <option value="NI">Nicaragua</option>
                                                                                                                                                                            <option value="NE">Niger</option>
                                                                                                                                                                            <option value="NG">Nigeria</option>
                                                                                                                                                                            <option value="NU">Niue</option>
                                                                                                                                                                            <option value="NF">Norfolk Island</option>
                                                                                                                                                                            <option value="MP">Northern Mariana Islands</option>
                                                                                                                                                                            <option value="NO">Norway</option>
                                                                                                                                                                            <option value="OM">Oman</option>
                                                                                                                                                                            <option value="PK">Pakistan</option>
                                                                                                                                                                            <option value="PW">Palau</option>
                                                                                                                                                                            <option value="PS">Palestinian Territory, Occupied</option>
                                                                                                                                                                            <option value="PA">Panama</option>
                                                                                                                                                                            <option value="PG">Papua New Guinea</option>
                                                                                                                                                                            <option value="PY">Paraguay</option>
                                                                                                                                                                            <option value="PE">Peru</option>
                                                                                                                                                                            <option value="PH">Philippines</option>
                                                                                                                                                                            <option value="PN">Pitcairn</option>
                                                                                                                                                                            <option value="PL">Poland</option>
                                                                                                                                                                            <option value="PT">Portugal</option>
                                                                                                                                                                            <option value="PR">Puerto Rico</option>
                                                                                                                                                                            <option value="QA">Qatar</option>
                                                                                                                                                                            <option value="RE">Reunion</option>
                                                                                                                                                                            <option value="RO">Romania</option>
                                                                                                                                                                            <option value="RU">Russian Federation</option>
                                                                                                                                                                            <option value="RW">Rwanda</option>
                                                                                                                                                                            <option value="BL">Saint Barthelemy</option>
                                                                                                                                                                            <option value="SH">Saint Helena, Ascension and Tristan da Cunha</option>
                                                                                                                                                                            <option value="KN">Saint Kitts and Nevis</option>
                                                                                                                                                                            <option value="LC">Saint Lucia</option>
                                                                                                                                                                            <option value="MF">Saint Martin</option>
                                                                                                                                                                            <option value="PM">Saint Pierre and Miquelon</option>
                                                                                                                                                                            <option value="VC">Saint Vincent and the Grenadines</option>
                                                                                                                                                                            <option value="WS">Samoa</option>
                                                                                                                                                                            <option value="SM">San Marino</option>
                                                                                                                                                                            <option value="ST">Sao Tome and Principe</option>
                                                                                                                                                                            <option value="SA">Saudi Arabia</option>
                                                                                                                                                                            <option value="SN">Senegal</option>
                                                                                                                                                                            <option value="RS">Serbia</option>
                                                                                                                                                                            <option value="SC">Seychelles</option>
                                                                                                                                                                            <option value="SL">Sierra Leone</option>
                                                                                                                                                                            <option value="SG">Singapore</option>
                                                                                                                                                                            <option value="SK">Slovakia</option>
                                                                                                                                                                            <option value="SI">Slovenia</option>
                                                                                                                                                                            <option value="SB">Solomon Islands</option>
                                                                                                                                                                            <option value="ZA">South Africa</option>
                                                                                                                                                                            <option value="GS">South Georgia and the South Sandwich Islands</option>
                                                                                                                                                                            <option value="ES">Spain</option>
                                                                                                                                                                            <option value="LK">Sri Lanka</option>
                                                                                                                                                                            <option value="SR">Suriname</option>
                                                                                                                                                                            <option value="SJ">Svalbard and Jan Mayen</option>
                                                                                                                                                                            <option value="SZ">Swaziland</option>
                                                                                                                                                                            <option value="SE">Sweden</option>
                                                                                                                                                                            <option value="CH">Switzerland</option>
                                                                                                                                                                            <option value="SY">Syrian Arab Republic</option>
                                                                                                                                                                            <option value="TW">Taiwan</option>
                                                                                                                                                                            <option value="TJ">Tajikistan</option>
                                                                                                                                                                            <option value="TZ">Tanzania, United Republic of</option>
                                                                                                                                                                            <option value="TH">Thailand</option>
                                                                                                                                                                            <option value="TG">Togo</option>
                                                                                                                                                                            <option value="TK">Tokelau</option>
                                                                                                                                                                            <option value="TO">Tonga</option>
                                                                                                                                                                            <option value="TT">Trinidad and Tobago</option>
                                                                                                                                                                            <option value="TN">Tunisia</option>
                                                                                                                                                                            <option value="TR">Turkey</option>
                                                                                                                                                                            <option value="TM">Turkmenistan</option>
                                                                                                                                                                            <option value="TC">Turks and Caicos Islands</option>
                                                                                                                                                                            <option value="TV">Tuvalu</option>
                                                                                                                                                                            <option value="UG">Uganda</option>
                                                                                                                                                                            <option value="UA">Ukraine</option>
                                                                                                                                                                            <option value="AE">United Arab Emirates</option>
                                                                                                                                                                            <option value="GB">United Kingdom</option>
                                                                                                                                                                            <option value="US" selected="selected">United States</option>
                                                                                                                                                                            <option value="UM">United States Minor Outlying Islands</option>
                                                                                                                                                                            <option value="UY">Uruguay</option>
                                                                                                                                                                            <option value="UZ">Uzbekistan</option>
                                                                                                                                                                            <option value="VU">Vanuatu</option>
                                                                                                                                                                            <option value="VE">Venezuela</option>
                                                                                                                                                                            <option value="VN">Vietnam</option>
                                                                                                                                                                            <option value="VG">Virgin Islands, British</option>
                                                                                                                                                                            <option value="VI">Virgin Islands, U.S.</option>
                                                                                                                                                                            <option value="WF">Wallis and Futuna</option>
                                                                                                                                                                            <option value="YE">Yemen</option>
                                                                                                                                                                            <option value="ZM">Zambia</option>
                                                                                                                                                                            <option value="ZW">Zimbabwe</option>
                                                                                                                                                                        </select>
                                                                                                                                                                    </td>
                                                                                                                                                                </tr>
                                                                                                                                                                <tr>
                                                                                                                                                                    <td>
                                                                                                                                                                        <label for="street-address">
                                                                                                                                                                            Street Address
                                                                                                                                                                        </label>
                                                                                                                                                                    </td>
                                                                                                                                                                </tr>
                                                                                                                                                                <tr>
                                                                                                                                                                    <td>
                                                                                                                                                                        <input maxlength="50" name="billingAddress.streetAddres.part1" type="text">
                                                                                                                                                                    </td>
                                                                                                                                                                </tr>
                                                                                                                                                                <tr>
                                                                                                                                                                    <td>
                                                                                                                                                                        <input type="hidden" maxlength="50" name="billingAddress.streetAddres.part2" type="text">
                                                                                                                                                                    </td>
                                                                                                                                                                </tr>
                                                                                                                                                                <tr>
                                                                                                                                                                    <td>
                                                                                                                                                                        <label>City</label>
                                                                                                                                                                    </td>
                                                                                                                                                                </tr>
                                                                                                                                                                <tr>
                                                                                                                                                                    <td>
                                                                                                                                                                        <input id="billingAdress.city.continue" type="hidden" value="0" >
                                                                                                                                                                            <input  maxlength="20" name="billingAddress.city" type="text" onBlur="checkCityValidity(this,'errorCity','billingAdress.city.continue')">
                                                                                                                                                                                <div id='errorCity' class="error">
                                                                                                                                                                                </div>
                                                                                                                                                                                </td>
                                                                                                                                                                                </tr>
                                                                                                                                                                                <tr>
                                                                                                                                                                                    <td>
                                                                                                                                                                                        <label>
                                                                                                                                                                                            Postal / Zip Code
                                                                                                                                                                                        </label>
                                                                                                                                                                                    </td>
                                                                                                                                                                                </tr>
                                                                                                                                                                                <tr>
                                                                                                                                                                                    <td>
                                                                                                                                                                                        <input id="billingAdress.zipCode.continue" type="hidden" value="0" >
                                                                                                                                                                                            <input  maxlength="20" name="billingAddress.zipCode" type="text" onBlur="checkZipCode(this,'errorZipCode','billingAdress.zipCode.continue')">
                                                                                                                                                                                                <div class="error" id="errorZipCode">
                                                                                                                                                                                                </div>
                                                                                                                                                                                                </td>
                                                                                                                                                                                                </tr>
                                                                                                                                                                                                <tr class="active" id="stateLebel">
                                                                                                                                                                                                    <td>
                                                                                                                                                                                                        <label>
                                                                                                                                                                                                        State
                                                                                                                                                                                                        </label>
                                                                                                                                                                                                    </td>
                                                                                                                                                                                                </tr>
                                                                                                                                                                                                <tr id="stateField" class="active">
                                                                                                                                                                                                    <td>
                                                                                                                                                                                                        <input id="billingAdress.stateField.continue" type="hidden" value="0" >
                                                                                                                                                                                                        <select name="billingAddress.state" onChange="checkState(this,'stateFieldError','billingAdress.stateField.continue')">
                                                                                                                                                                                                        <option value="null">- Select State -</option>
                                                                                                                                                                                                        <option value="AL">Alabama</option>
                                                                                                                                                                                                        <option value="AK">Alaska</option>
                                                                                                                                                                                                        <option value="AS">American Samoa</option>
                                                                                                                                                                                                        <option value="AZ">Arizona</option>
                                                                                                                                                                                                        <option value="AR">Arkansas</option>
                                                                                                                                                                                                        <option value="AA">Armed Forces Americas excluding Canada</option>
                                                                                                                                                                                                        <option value="AE">Armed Forces EMEA and Canada</option>
                                                                                                                                                                                                        <option value="AP">Armed Forces Pacific</option>
                                                                                                                                                                                                        <option value="CA">California</option>
                                                                                                                                                                                                        <option value="CO">Colorado</option>
                                                                                                                                                                                                        <option value="CT">Connecticut</option>
                                                                                                                                                                                                        <option value="DE">Delaware</option>
                                                                                                                                                                                                        <option value="DC">District of Columbia</option>
                                                                                                                                                                                                        <option value="FM">Federated States of Micronesia</option>
                                                                                                                                                                                                        <option value="FL">Florida</option>
                                                                                                                                                                                                        <option value="GA">Georgia</option>
                                                                                                                                                                                                        <option value="GU">Guam</option>
                                                                                                                                                                                                        <option value="HI">Hawaii</option>
                                                                                                                                                                                                        <option value="ID">Idaho</option>
                                                                                                                                                                                                        <option value="IL">Illinois</option>
                                                                                                                                                                                                        <option value="IN">Indiana</option>
                                                                                                                                                                                                        <option value="IA">Iowa</option>
                                                                                                                                                                                                        <option value="KS">Kansas</option>
                                                                                                                                                                                                        <option value="KY">Kentucky</option>
                                                                                                                                                                                                        <option value="LA">Louisiana</option>
                                                                                                                                                                                                        <option value="ME">Maine</option>
                                                                                                                                                                                                        <option value="MH">Marshall Islands</option>
                                                                                                                                                                                                        <option value="MD">Maryland</option>
                                                                                                                                                                                                        <option value="MA">Massachusetts</option>
                                                                                                                                                                                                        <option value="MI">Michigan</option>
                                                                                                                                                                                                        <option value="MN">Minnesota</option>
                                                                                                                                                                                                        <option value="MS">Mississippi</option>
                                                                                                                                                                                                        <option value="MO">Missouri</option>
                                                                                                                                                                                                        <option value="MT">Montana</option>
                                                                                                                                                                                                        <option value="NE">Nebraska</option>
                                                                                                                                                                                                        <option value="NV">Nevada</option>
                                                                                                                                                                                                        <option value="NH">New Hampshire</option>
                                                                                                                                                                                                        <option value="NJ">New Jersey</option>
                                                                                                                                                                                                        <option value="NM">New Mexico</option>
                                                                                                                                                                                                        <option value="NY">New York</option>
                                                                                                                                                                                                        <option value="NC">North Carolina</option>
                                                                                                                                                                                                        <option value="ND">North Dakota</option>
                                                                                                                                                                                                        <option value="MP">Northern Mariana Islands</option>
                                                                                                                                                                                                        <option value="OH">Ohio</option>
                                                                                                                                                                                                        <option value="OK">Oklahoma</option>
                                                                                                                                                                                                        <option value="OR">Oregon</option>
                                                                                                                                                                                                        <option value="PA">Pennsylvania</option>
                                                                                                                                                                                                        <option value="PR">Puerto Rico</option>
                                                                                                                                                                                                        <option value="RI">Rhode Island</option>
                                                                                                                                                                                                        <option value="SC">South Carolina</option>
                                                                                                                                                                                                        <option value="SD">South Dakota</option>
                                                                                                                                                                                                        <option value="TN">Tennessee</option>
                                                                                                                                                                                                        <option value="TX">Texas</option>
                                                                                                                                                                                                        <option value="UT">Utah</option>
                                                                                                                                                                                                        <option value="VT">Vermont</option>
                                                                                                                                                                                                        <option value="VI">Virgin Islands</option>
                                                                                                                                                                                                        <option value="VA">Virginia</option>
                                                                                                                                                                                                        <option value="WA">Washington</option>
                                                                                                                                                                                                        <option value="WV">West Virginia</option>
                                                                                                                                                                                                        <option value="WI">Wisconsin</option>
                                                                                                                                                                                                        <option value="WY">Wyoming</option>
                                                                                                                                                                                                        </select>
                                                                                                                                                                                                        <div class="error" id='stateFieldError'>

                                                                                                                                                                                                        </div>

                                                                                                                                                                                                    </td>
                                                                                                                                                                                                </tr>
                                                                                                                                                                                                <tr>
                                                                                                                                                                                                    <td>
                                                                                                                                                                                                        <div id="cancelationPolicy">
                                                                                                                                                                                                        <table>
                                                                                                                                                                                                        <tr>
                                                                                                                                                                                                        <td>
                                                                                                                                                                                                        <h2>Cancelation Policy</h2>
                                                                                                                                                                                                        </td>
                                                                                                                                                                                                        <td>
                                                                                                                                                                                                        </td>
                                                                                                                                                                                                        </tr>
                                                                                                                                                                                                        </table>
                                                                                                                                                                                                        </div>
                                                                                                                                                                                                        <input name="termsAndConditions" value="true" type="checkbox" onClick="checkForm(this,'completeReservationButton')" autocomplete="off">
                                                                                                                                                                                                        <label>
                                                                                                                                                                                                        I agree to
                                                                                                                                                                                                        <a href="http://travel.ian.com/index.jsp?pageName=userAgreement&locale=en_US&cid=xxx" target="_blank">
                                                                                                                                                                                                        Terms and Conditions
                                                                                                                                                                                                        </a>
                                                                                                                                                                                                        and understand Cancellation Policy.
                                                                                                                                                                                                        </label>
                                                                                                                                                                                                    </td>
                                                                                                                                                                                                </tr>
                                                                                                                                                                                                <tr>
                                                                                                                                                                                                    <td align="right">
                                                                                                                                                                                                        <button id="completeReservationButton" disabled type="submit"  name="book" value="book">
                                                                                                                                                                                                        Complete Reservation
                                                                                                                                                                                                        </button>
                                                                                                                                                                                                    </td>
                                                                                                                                                                                                </tr>
                                                                                                                                                                                                </table>

                                                                                                                                                                                                </div>
                                                                                                                                                                                                </div>
                                                                                                                                                                                                </form>
                                                                                                                                                                                                </td>
                                                                                                                                                                                                <td class="bookingPage_right">
                                                                                                                                                                                                    <div class="checkOutInfo">
                                                                                                                                                                                                        <div class="colored">
                                                                                                                                                                                                            <h4>
                                                                                                                                                                                                            Your Booking Summary
                                                                                                                                                                                                            </h4>
                                                                                                                                                                                                        </div>
                                                                                                                                                                                                        <div class="colored">
                                                                                                                                                                                                            <table >
                                                                                                                                                                                                                <tr>
                                                                                                                                                                                                                    <td>
                                                                                                                                                                                                                        <?php
                                                                                                                                                                                                                            echo '<img src="'.$_POST["hotelImage"].'"/>'
                                                                                                                                                                                                                        ?>

                                                                                                                                                                                                                    </td>
                                                                                                                                                                                                                    <td>
                                                                                                                                                                                                                        <b>
                                                                                                                                                                                                                        <?php
                                                                                                                                                                                                                            echo $_POST["hotelName"]
                                                                                                                                                                                                                        ?>
                                                                                                                                                                                                                        </b>
                                                                                                                                                                                                                    </td>
                                                                                                                                                                                                                </tr>
                                                                                                                                                                                                            </table>
                                                                                                                                                                                                        </div>
                                                                                                                                                                                                        <div class="colored">
                                                                                                                                                                                                            <div style="padding:5px">
                                                                                                                                                                                                            <b>
                                                                                                                                                                                                                CheckIn:
                                                                                                                                                                                                                <?php echo  $_SESSION["checkIn"];  ?>
                                                                                                                                                                                                            </b>
                                                                                                                                                                                                            </div>
                                                                                                                                                                                                            <div style="padding:5px">
                                                                                                                                                                                                            <b>
                                                                                                                                                                                                                CheckOut:
                                                                                                                                                                                                                <?php echo  $_SESSION["checkOut"];  ?>
                                                                                                                                                                                                            </div>

                                                                                                                                                                                                            </b>
                                                                                                                                                                                                            </div>
                                                                                                                                                                                                        <div class="colored" style="padding: 5px;">
                                                                                                                                                                                                            <b>
                                                                                                                                                                                                            <?php echo $_POST["roomDescription"].",Non-Smoking";

                                                                                                                                                                                                            ?>
                                                                                                                                                                                                            </b>
                                                                                                                                                                                                        </div>
                                                                                                                                                                                                        <div class="borderedItems colored" style="padding-right:5px;padding-left:5px;">

                                                                                                                                                                                                            <div class="borderedItems">
                                                                                                                                                                                                            Total without taxes:(-not implemented-)
                                                                                                                                                                                                            </div>

                                                                                                                                                                                                            <div class="borderedItems">
                                                                                                                                                                                                            Tax recovery charges
                                                                                                                                                                                                            <br>and service fees:(-not implemented-)
                                                                                                                                                                                                            </div>
                                                                                                                                                                                                            <div class="borderedItems">
                                                                                                                                                                                                            <b>
                                                                                                                                                                                                            You will be charged a total of:(-not implemented-)
                                                                                                                                                                                                            </b>
                                                                                                                                                                                                            </div>
                                                                                                                                                                                                        </div>
                                                                                                                                                                                                        <div class="colored">
                                                                                                                                                                                                         All prices are displayed in:
                                                                                                                                                                                                         <br>
                                                                                                                                                                                                         You will be charged in INR: ₨ 4,032.02
                                                                                                                                                                                                         <br>
                                                                                                                                                                                                         Full payment will be charged to your credit
                                                                                                                                                                                                         card when you book this hotel. Please be aware
                                                                                                                                                                                                         that your bank may convert the payment to your
                                                                                                                                                                                                         local currency and charge you an additional conversion fee.
                                                                                                                                                                                                         This means that the amount you see on your credit
                                                                                                                                                                                                         or bank card statement may be in your local currency
                                                                                                                                                                                                         and therefore a different figure than the Total Price
                                                                                                                                                                                                         shown above. If you have any questions about this fee or
                                                                                                                                                                                                         the exchange rate applied to your booking, please
                                                                                                                                                                                                         contact your bank.

                                                                                                                                                                                                        </div>
                                                                                                                                                                                                        <div class="colored" >
                                                                                                                                                                                                        <b>
                                                                                                                                                                                                        Please note that pressing the 'Confirm Reservation' button multiple times may result in multiple bookings,
                                                                                                                                                                                                        for which we, Xoomworks RO SRL, cannot be helded accounted for.
                                                                                                                                                                                                        </b>
                                                                                                                                                                                                        </div>
                                                                                                                                                                                                    </div>
                                                                                                                                                                                                                                                                                                                                                                                                   </td>
                                                                                                                                                                                                </tr>
                                                                                                                                                                                                </table>
                                                                                                                                                                                                </div>

                                                                                                                                                                                                <script type="text/javascript">

                                                                                                                                                                                                    function replaceClass(a,b,id)
                                                                                                                                                                                                    {

                                                                                                                                                                                                        document.getElementById(id).classList.add(b);
                                                                                                                                                                                                        document.getElementById(id).classList.remove(a);
                                                                                                                                                                                                    }

                                                                                                                                                                                                    function switch_step(a,b)
                                                                                                                                                                                                    {
                                                                                                                                                                                                        if((a==1)&&(b==2)&&(document.getElementById('go_to_step2').value=='continue'))
                                                                                                                                                                                                        {
                                                                                                                                                                                                            replaceClass('active','inactive','booking_step1');
                                                                                                                                                                                                            replaceClass('inactive','active','booking_step2');
                                                                                                                                                                                                            replaceClass('step_active','step_inactive','step_1');
                                                                                                                                                                                                            replaceClass('step_inactive','step_active','step_2');
                                                                                                                                                                                                        }
                                                                                                                                                                                                        else
                                                                                                                                                                                                        {
                                                                                                                                                                                                            alert("Please check the data again.");
                                                                                                                                                                                                        }
                                                                                                                                                                                                    }


                                                                                                                                                                                                    function checkNameValidity(elem,id,idValidity)
                                                                                                                                                                                                    {
                                                                                                                                                                                                        var ok=false;
                                                                                                                                                                                                        var leters="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ";
                                                                                                                                                                                                        var text=elem.value;


                                                                                                                                                                                                        for(i=0;i<elem.value.length;i++)
                                                                                                                                                                                                        {
                                                                                                                                                                                                            if(leters.indexOf(text[i])<0)
                                                                                                                                                                                                            {
                                                                                                                                                                                                                ok=true;
                                                                                                                                                                                                            }
                                                                                                                                                                                                            //alert(i);
                                                                                                                                                                                                        }

                                                                                                                                                                                                        if(ok)
                                                                                                                                                                                                        {
                                                                                                                                                                                                            document.getElementById(id).innerHTML="Invalid name. The name can not contain numbers or special chars.";
                                                                                                                                                                                                            elem.style.borderColor="#f00";
                                                                                                                                                                                                            document.getElementById(idValidity).value=0;
                                                                                                                                                                                                        }
                                                                                                                                                                                                        else
                                                                                                                                                                                                        {

                                                                                                                                                                                                            elem.style.borderColor="#000";

                                                                                                                                                                                                            document.getElementById(id).innerHTML="";
                                                                                                                                                                                                            document.getElementById(idValidity).value=1;

                                                                                                                                                                                                        }
                                                                                                                                                                                                    }

                                                                                                                                                                                                    function checkPhoneValidity(elem,id,idValidity)
                                                                                                                                                                                                    {
                                                                                                                                                                                                        var ok=false;
                                                                                                                                                                                                        var digits="0123456789";
                                                                                                                                                                                                        var text=elem.value;


                                                                                                                                                                                                        for(i=0;i<elem.value.length;i++)
                                                                                                                                                                                                        {
                                                                                                                                                                                                            if(digits.indexOf(text[i])<0)
                                                                                                                                                                                                            {
                                                                                                                                                                                                                ok=true;
                                                                                                                                                                                                            }
                                                                                                                                                                                                            //alert(i);
                                                                                                                                                                                                        }

                                                                                                                                                                                                        if(ok)
                                                                                                                                                                                                        {
                                                                                                                                                                                                            document.getElementById(id).innerHTML="Invalid phone number. The phone number should contain only digits.";
                                                                                                                                                                                                            elem.style.borderColor="#f00";
                                                                                                                                                                                                            document.getElementById(idValidity).value=0;
                                                                                                                                                                                                        }
                                                                                                                                                                                                        else
                                                                                                                                                                                                        {

                                                                                                                                                                                                            elem.style.borderColor="#000";

                                                                                                                                                                                                            document.getElementById(id).innerHTML="";
                                                                                                                                                                                                            document.getElementById(idValidity).value=1;

                                                                                                                                                                                                        }
                                                                                                                                                                                                    }

                                                                                                                                                                                                    function checkEmailValidity(elem,id,idValidity)
                                                                                                                                                                                                    {
                                                                                                                                                                                                        var ok=true;
                                                                                                                                                                                                        var chars="@.";
                                                                                                                                                                                                        var em=elem.value;
                                                                                                                                                                                                        var email;
                                                                                                                                                                                                        email = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;

                                                                                                                                                                                                        if (!em.match(email))
                                                                                                                                                                                                            ok=false;
                                                                                                                                                                                                        else
                                                                                                                                                                                                            or=true;


                                                                                                                                                                                                        if(!ok)
                                                                                                                                                                                                        {
                                                                                                                                                                                                            document.getElementById(id).innerHTML="Invalid email address.";
                                                                                                                                                                                                            elem.style.borderColor="#f00";
                                                                                                                                                                                                            document.getElementById(idValidity).value=0;
                                                                                                                                                                                                        }
                                                                                                                                                                                                        else
                                                                                                                                                                                                        {

                                                                                                                                                                                                            elem.style.borderColor="#000";

                                                                                                                                                                                                            document.getElementById(id).innerHTML="";
                                                                                                                                                                                                            document.getElementById(idValidity).value=1;

                                                                                                                                                                                                        }
                                                                                                                                                                                                    }

                                                                                                                                                                                                    function emailMatch(em1,em2,ider,idValidity)

                                                                                                                                                                                                    {
                                                                                                                                                                                                        var email;
                                                                                                                                                                                                        email = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;

                                                                                                                                                                                                        if(!(document.getElementById(em1).value==document.getElementById(em2).value))
                                                                                                                                                                                                        {
                                                                                                                                                                                                            document.getElementById(ider).innerHTML='Email addresses don\'t match!';
                                                                                                                                                                                                            document.getElementById(em1).style.borderColor='#f00';
                                                                                                                                                                                                            document.getElementById(em2).style.borderColor='#f00';
                                                                                                                                                                                                            document.getElementById(idValidity).value=0;

                                                                                                                                                                                                        }
                                                                                                                                                                                                        else
                                                                                                                                                                                                        {
                                                                                                                                                                                                            document.getElementById(ider).innerHTML="";
                                                                                                                                                                                                            document.getElementById(idValidity).value=1;

                                                                                                                                                                                                            document.getElementById(em2).style.borderColor='#000';
                                                                                                                                                                                                            if(document.getElementById(em1).value.match(email))
                                                                                                                                                                                                            {
                                                                                                                                                                                                                document.getElementById(em1).style.borderColor='#000';
                                                                                                                                                                                                            }
                                                                                                                                                                                                        }

                                                                                                                                                                                                    }

                                                                                                                                                                                                    function chechFileldsValidityStep1()
                                                                                                                                                                                                    {
                                                                                                                                                                                                        var ok=true;

                                                                                                                                                                                                        //	if(document.getElementById('guest.firstName.continue').value==0) ok=false;
                                                                                                                                                                                                        //	if(document.getElementById('guest.lastName.continue').value==0) ok=false;
                                                                                                                                                                                                        if(document.getElementById('contactDetails.emaiAddress.continue').value==0) ok=false;
                                                                                                                                                                                                        if(document.getElementById('contactDetails.confirmEmailAddress.continue').value==0) ok=false;
                                                                                                                                                                                                        if(document.getElementById('contactDetails.phoneNumber.continue').value==0) ok=false;

                                                                                                                                                                                                        if(ok==true) document.getElementById('go_to_step2').value='continue';

                                                                                                                                                                                                    }

                                                                                                                                                                                                    function checkCreditCardNumber(elem,errorId,idValidity)
                                                                                                                                                                                                    {
                                                                                                                                                                                                        var ok=false;
                                                                                                                                                                                                        var digits="0123456789";
                                                                                                                                                                                                        var text=elem.value;


                                                                                                                                                                                                        for(i=0;i<elem.value.length;i++)
                                                                                                                                                                                                        {
                                                                                                                                                                                                            if(digits.indexOf(text[i])<0)
                                                                                                                                                                                                            {
                                                                                                                                                                                                                ok=true;
                                                                                                                                                                                                            }

                                                                                                                                                                                                        }
                                                                                                                                                                                                        if(text.length!=16)
                                                                                                                                                                                                        {
                                                                                                                                                                                                            ok=true;
                                                                                                                                                                                                        }

                                                                                                                                                                                                        if(ok==true)
                                                                                                                                                                                                        {
                                                                                                                                                                                                            document.getElementById('creditCardError').innerHTML="Invalid credit card number";
                                                                                                                                                                                                            document.getElementById(idValidity).value=0;
                                                                                                                                                                                                            elem.style.borderColor='#f00';
                                                                                                                                                                                                        }
                                                                                                                                                                                                        else
                                                                                                                                                                                                        {
                                                                                                                                                                                                            document.getElementById('creditCardError').innerHTML="";
                                                                                                                                                                                                            document.getElementById(idValidity).value=1;
                                                                                                                                                                                                            elem.style.borderColor='#000';
                                                                                                                                                                                                        }
                                                                                                                                                                                                    }

                                                                                                                                                                                                    function checkExpirationDate(yearobj,monthId,errorId,idValidity)
                                                                                                                                                                                                    {
                                                                                                                                                                                                        var elMonth=document.getElementById(monthId);
                                                                                                                                                                                                        var selectedMonth=elMonth.options[elMonth.selectedIndex];
                                                                                                                                                                                                        var month,year;
                                                                                                                                                                                                        var d= new Date();
                                                                                                                                                                                                        var ok= true;

                                                                                                                                                                                                        month=parseInt(selectedMonth.value);
                                                                                                                                                                                                        //alert(d.getFullYear());
                                                                                                                                                                                                        year=yearobj.options[yearobj.selectedIndex].value;

                                                                                                                                                                                                        if(month){
                                                                                                                                                                                                            if(month<d.getMonth()+1)
                                                                                                                                                                                                            {
                                                                                                                                                                                                                if(year<=d.getFullYear())
                                                                                                                                                                                                                {
                                                                                                                                                                                                                    ok=false;
                                                                                                                                                                                                                }
                                                                                                                                                                                                                else
                                                                                                                                                                                                                {
                                                                                                                                                                                                                    ok=true;
                                                                                                                                                                                                                }
                                                                                                                                                                                                            }
                                                                                                                                                                                                            else
                                                                                                                                                                                                            {
                                                                                                                                                                                                                if(year<=d.getFullYear())
                                                                                                                                                                                                                {
                                                                                                                                                                                                                    ok= false;
                                                                                                                                                                                                                }
                                                                                                                                                                                                                else
                                                                                                                                                                                                                {
                                                                                                                                                                                                                    ok= true;
                                                                                                                                                                                                                }
                                                                                                                                                                                                            }
                                                                                                                                                                                                        }
                                                                                                                                                                                                        else
                                                                                                                                                                                                        {
                                                                                                                                                                                                            ok=false;
                                                                                                                                                                                                        }
                                                                                                                                                                                                        if(!ok)
                                                                                                                                                                                                        {
                                                                                                                                                                                                            yearobj.style.borderColor="#f00";
                                                                                                                                                                                                            document.getElementById(monthId).style.borderColor='#f00';
                                                                                                                                                                                                            document.getElementById(idValidity).value=0;
                                                                                                                                                                                                            document.getElementById(errorId).innerHTML="Invalid date."
                                                                                                                                                                                                        }
                                                                                                                                                                                                        else
                                                                                                                                                                                                        {
                                                                                                                                                                                                            yearobj.style.borderColor="#000";
                                                                                                                                                                                                            document.getElementById(monthId).style.borderColor='#000';
                                                                                                                                                                                                            document.getElementById(idValidity).value=1;
                                                                                                                                                                                                            document.getElementById(errorId).innerHTML=""
                                                                                                                                                                                                        }



                                                                                                                                                                                                    }
                                                                                                                                                                                                    function checkCardSecurityCode(elem,errorId,idValidity)
                                                                                                                                                                                                    {
                                                                                                                                                                                                        var text=elem.value;
                                                                                                                                                                                                        var digits='0123456789';
                                                                                                                                                                                                        var ok= true;
                                                                                                                                                                                                        for(i=0;i<text.length;i++)
                                                                                                                                                                                                        {
                                                                                                                                                                                                            if(!(digits.indexOf(text[i])>=0))
                                                                                                                                                                                                            {
                                                                                                                                                                                                                ok= false;
                                                                                                                                                                                                            }
                                                                                                                                                                                                        }
                                                                                                                                                                                                        if(!ok)
                                                                                                                                                                                                        {
                                                                                                                                                                                                            document.getElementById(errorId).innerHTML="Invalid Security Code!";
                                                                                                                                                                                                            elem.style.borderColor="#f00";
                                                                                                                                                                                                            document.getElementById(idValidity).value=0;
                                                                                                                                                                                                        }
                                                                                                                                                                                                        else
                                                                                                                                                                                                        {
                                                                                                                                                                                                            document.getElementById(idValidity).value=1;
                                                                                                                                                                                                            document.getElementById(errorId).innerHTML="";
                                                                                                                                                                                                            elem.style.borderColor="#000";
                                                                                                                                                                                                        }
                                                                                                                                                                                                    }

                                                                                                                                                                                                    function checkCityValidity(elem,errorId,idValidity)
                                                                                                                                                                                                    {
                                                                                                                                                                                                        var text=elem.value;
                                                                                                                                                                                                        var leters=/^[A-Z-a-z]+$/;


                                                                                                                                                                                                        if(text.match(leters))
                                                                                                                                                                                                        {
                                                                                                                                                                                                            document.getElementById(idValidity).value=1
                                                                                                                                                                                                            document.getElementById(errorId).innerHTML="";
                                                                                                                                                                                                            elem.style.borderColor="#000";
                                                                                                                                                                                                        }
                                                                                                                                                                                                        else
                                                                                                                                                                                                        {
                                                                                                                                                                                                            document.getElementById(idValidity).value=0
                                                                                                                                                                                                            document.getElementById(errorId).innerHTML="Invalid city name!";
                                                                                                                                                                                                            elem.style.borderColor="#f00";
                                                                                                                                                                                                        }


                                                                                                                                                                                                    }

                                                                                                                                                                                                    function checkZipCode(elem,errorId,idValidity)
                                                                                                                                                                                                    {
                                                                                                                                                                                                        var numbers=/^[0-9]+$/;
                                                                                                                                                                                                        var text= elem.value;
                                                                                                                                                                                                        if(text.match(numbers))
                                                                                                                                                                                                        {
                                                                                                                                                                                                            document.getElementById(errorId).innerHTML="";
                                                                                                                                                                                                            document.getElementById(idValidity).value=1;
                                                                                                                                                                                                            elem.style.borderColor='#000';
                                                                                                                                                                                                        }
                                                                                                                                                                                                        else
                                                                                                                                                                                                        {
                                                                                                                                                                                                            document.getElementById(errorId).innerHTML="Invalid ZIP code";
                                                                                                                                                                                                            document.getElementById(idValidity).value=0;
                                                                                                                                                                                                            elem.style.borderColor='#f00';
                                                                                                                                                                                                        }
                                                                                                                                                                                                    }

                                                                                                                                                                                                    function checkCountry(elem,stateFieldId,stateLabelId,stateIdValidity)
                                                                                                                                                                                                    {
                                                                                                                                                                                                        var country=elem.options[elem.selectedIndex].value;

                                                                                                                                                                                                        if(country=="US")
                                                                                                                                                                                                        {
                                                                                                                                                                                                            document.getElementById(stateFieldId).classList.remove('inactive');
                                                                                                                                                                                                            document.getElementById(stateFieldId).classList.add('active');

                                                                                                                                                                                                            document.getElementById(stateLabelId).classList.remove('inactive');
                                                                                                                                                                                                            document.getElementById(stateLabelId).classList.add('active');

                                                                                                                                                                                                            document.getElementById(stateIdValidity).value=0;

                                                                                                                                                                                                        }
                                                                                                                                                                                                        else
                                                                                                                                                                                                        {

                                                                                                                                                                                                            document.getElementById(stateFieldId).classList.remove('active');
                                                                                                                                                                                                            document.getElementById(stateFieldId).classList.add('inactive');

                                                                                                                                                                                                            document.getElementById(stateLabelId).classList.remove('active');
                                                                                                                                                                                                            document.getElementById(stateLabelId).classList.add('inactive');

                                                                                                                                                                                                            document.getElementById(stateIdValidity).value=1;
                                                                                                                                                                                                        }

                                                                                                                                                                                                    }
                                                                                                                                                                                                    function checkState(elem,errorId,idValidity)
                                                                                                                                                                                                    {
                                                                                                                                                                                                        if(elem.options[elem.selectedIndex].value=="")
                                                                                                                                                                                                        {
                                                                                                                                                                                                            document.getElementById(errorId).innerHTML="Selecte a state!";
                                                                                                                                                                                                            document.getElementById(idValidity).value=0;
                                                                                                                                                                                                            elem.borderColor="#f00";
                                                                                                                                                                                                        }
                                                                                                                                                                                                        else
                                                                                                                                                                                                        {
                                                                                                                                                                                                            document.getElementById(errorId).innerHTML="";
                                                                                                                                                                                                            document.getElementById(idValidity).value=1;
                                                                                                                                                                                                            elem.borderColor="#000";

                                                                                                                                                                                                        }
                                                                                                                                                                                                    }
                                                                                                                                                                                                    function checkForm(elem,completeRezButtonId)
                                                                                                                                                                                                    {
                                                                                                                                                                                                        var correct;
                                                                                                                                                                                                        correct=1;

                                                                                                                                                                                                        correct*=parseInt(document.getElementById('creditCardInformation.cardType.continue').value);
                                                                                                                                                                                                        correct*=parseInt(document.getElementById('creditCardInformation.creditCardNumber.continue').value);
                                                                                                                                                                                                        correct*=parseInt(document.getElementById('creditCardInformation.cardHolderFirstName.continue').value);
                                                                                                                                                                                                        correct*=parseInt(document.getElementById('creditCardInformation.cardHolderLastName.continue').value);
                                                                                                                                                                                                        correct*=parseInt(document.getElementById('creditCardInformation.expirationDate.continue').value);
                                                                                                                                                                                                        correct*=parseInt(document.getElementById('creditCardInformation.securityCode.continue').value);
                                                                                                                                                                                                        correct*=parseInt(document.getElementById('billingAdress.city.continue').value);
                                                                                                                                                                                                        correct*=parseInt(document.getElementById('billingAdress.zipCode.continue').value);
                                                                                                                                                                                                        correct*=parseInt(document.getElementById('billingAdress.stateField.continue').value);
                                                                                                                                                                                                        correct*=parseInt(document.getElementById('creditCardInformation.cardType.continue').value);





                                                                                                                                                                                                        if(correct==1)
                                                                                                                                                                                                        {
                                                                                                                                                                                                            if(elem.checked)
                                                                                                                                                                                                            {
                                                                                                                                                                                                                document.getElementById(completeRezButtonId).disabled=false;
                                                                                                                                                                                                            }
                                                                                                                                                                                                        }
                                                                                                                                                                                                        else
                                                                                                                                                                                                        {
                                                                                                                                                                                                            document.getElementById(completeRezButtonId).disabled=true;
                                                                                                                                                                                                            alert("Please check the data again.");
                                                                                                                                                                                                        }
                                                                                                                                                                                                    }
                                                                                                                                                                                                    function checkCardType(elem,errorId,idValidity)
                                                                                                                                                                                                    {


                                                                                                                                                                                                        if(elem.options[elem.selectedIndex].value=='')
                                                                                                                                                                                                        {
                                                                                                                                                                                                            document.getElementById(errorId).innerHTML="Select Your Card Type";
                                                                                                                                                                                                            document.getElementById(idValidity).value=0;
                                                                                                                                                                                                            elem.style.borderColor="#f00";
                                                                                                                                                                                                        }
                                                                                                                                                                                                        else
                                                                                                                                                                                                        {
                                                                                                                                                                                                            document.getElementById(errorId).innerHTML="";
                                                                                                                                                                                                            document.getElementById(idValidity).value=1;
                                                                                                                                                                                                            elem.style.borderColor="#000";

                                                                                                                                                                                                        }
                                                                                                                                                                                                    }
                                                                                                                                                                                                </script>



                                                                                                                                                                                                <?php
                                                                                                                                                                                                $smarty->display('footer.tpl');
                                                                                                                                                                                                ?>
                                                                                                                                                                                                </body>
                                                                                                                                                                                                </html>



